Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micro-services deployment #882

Merged
merged 18 commits into from
Dec 6, 2023
Merged

Conversation

nrybowski
Copy link
Member

@nrybowski nrybowski commented Oct 21, 2022

This PR implements the feature #875.

TODO

  • Services deployment
    • Mongodb
    • Backend service
    • Agents
      • Docker
      • MCQ
    • Frontend
  • Implement a layered container design (base container with python and /common, ...)
  • Define a structure for the Containerfiles and setup files?
  • [ ] Template for setup file rather than hardcoding (since only the dependencies change).
    • [ ] setup.py template. Should be able to retrieve the current INGInious version.
    • [ ] Multi-stage container. Stage 1 produces the setup.py file, Stage 2 is the actual container image.
  • Add documentation in README.
  • Move container image from Ubuntu to Rocky8
  • Initial setup of MongoDB (superadmin, ...)

To implement in other PRs

Those are nice-to-have not required for a minimal prototype.

  • Implement a clean solution for Agent docker.
  • Agent Kata?
  • Containers should be automatically built and pushed in the DockerHub for the development version and the latest stable version.
  • Automated containers build

@nrybowski
Copy link
Member Author

Rebase on 85f764d.

@nrybowski nrybowski force-pushed the micro-services branch 2 times, most recently from bf388a1 to 1f94ec1 Compare January 11, 2023 21:29
@nrybowski nrybowski marked this pull request as ready for review January 11, 2023 21:48
@nrybowski nrybowski linked an issue Jan 11, 2023 that may be closed by this pull request
@anthonygego anthonygego self-requested a review January 18, 2023 13:50
Copy link
Member

@anthonygego anthonygego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool.

I'm however wondering if this is not premature optimization to split the package files at this time.

It would probably be more secure for coherency, in a first time, to install the whole package in the inginious-base container and make the other containers just run the appropriate things. That'll probably not used more space (even though it's only a few megabytes). Currently, it breaks the version number footer, which is a bit sad.

This package split could be performed in a second time, not only for a container deployment.

We can also discuss if it's worth putting those files in this particular repo as the containerfiles could be relying on pip installs. It would probably be better to maintain and be more self-documenting for sysadmins to provide docker compose files that actually perform the same operations as would be necessary for manual install method.

README.rst Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
configuration.deploy.yaml Show resolved Hide resolved
inginious/frontend/arch_helper.py Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
deploy/agent-mcq.setup Outdated Show resolved Hide resolved
deploy/frontend.setup Outdated Show resolved Hide resolved
deploy/frontend.setup Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
deploy/db_setup.py Show resolved Hide resolved
@nrybowski
Copy link
Member Author

Rebase on 61ead04.

README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
deploy/inginious-base.containerfile Show resolved Hide resolved
deploy/agent-docker.containerfile Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
@nrybowski
Copy link
Member Author

Rebase on 80e367a

@anthonygego
Copy link
Member

LGTM. I'll squash all the commits as they are a lot and are essentially additions

@anthonygego anthonygego self-requested a review December 6, 2023 12:17
@anthonygego anthonygego merged commit 21abf3d into UCL-INGI:master Dec 6, 2023
2 of 3 checks passed
@anthonygego
Copy link
Member

🥳

AlexandreDoneux pushed a commit to AlexandreDoneux/INGInious that referenced this pull request Dec 7, 2023
* Add backend service

* Add agent-docker service

* Add agent-mcq service

* Add mongo-db container

* Layered services images

* Add frontend service

* [deploy] From Ubuntu to Rocky8

* [deploy] Update README

* [deploy] Add initial MongoDB setup

* [deploy] Update INGInious stack doc

* [deploy] Rebase and update documentation

* [deploy] Revert setup sub-division

* [deploy] Add core containers build to CI

* Use code escape in documentation

Suggested changes by @anthonygego

Co-authored-by: Anthony Gégo <[email protected]>

* [deploy/compose] Build base image in stack deploy

* [deploy] Update doc about core containers build

* [deploy/base] Document the containerfile

* [deploy] Update review comments

- Add .env file with defaults values for REGISTRY and VERSION variables
- Fix "docker compose" syntax for modern deployements

---------

Co-authored-by: Anthony Gégo <[email protected]>
nrybowski added a commit that referenced this pull request Jan 6, 2025
* Add backend service

* Add agent-docker service

* Add agent-mcq service

* Add mongo-db container

* Layered services images

* Add frontend service

* [deploy] From Ubuntu to Rocky8

* [deploy] Update README

* [deploy] Add initial MongoDB setup

* [deploy] Update INGInious stack doc

* [deploy] Rebase and update documentation

* [deploy] Revert setup sub-division

* [deploy] Add core containers build to CI

* Use code escape in documentation

Suggested changes by @anthonygego

Co-authored-by: Anthony Gégo <[email protected]>

* [deploy/compose] Build base image in stack deploy

* [deploy] Update doc about core containers build

* [deploy/base] Document the containerfile

* [deploy] Update review comments

- Add .env file with defaults values for REGISTRY and VERSION variables
- Fix "docker compose" syntax for modern deployements

---------

Co-authored-by: Anthony Gégo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

From monolith to micro-service model
2 participants